<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./WEB-INF/Templates/default.xhtml">

            <ui:define name="content">
                <ui:debug />
                <h:form>
                    <h:panelGrid columns="3">
                        <h:outputText id="cave" value="Cave"/>
                        <h:selectOneMenu value="#{EditHelperBean.dragon.cave}">
                            <f:selectItems value="#{BibliotekaBean.cavesAsSelectItems}" />
                        </h:selectOneMenu>
                        <h:message for="cave" />

                        <h:outputText value="Name"/>
                        <h:inputText id="nickname" value="#{EditHelperBean.dragon.nickname}"/>
                        <h:message for="nickname" />

                        <h:outputText value="Wingspan"/>
                        <h:inputText id="wingspan" value="#{EditHelperBean.dragon.wingspan}" />
                        <h:message for="wingspan" />

                        <h:outputText value="Fire color"/>
                        <h:inputText id="fireColor" value="#{EditHelperBean.dragon.fireColor}" />
                        <h:message for="fireColor" />

                        <h:commandButton action="#{EditHelperBean.zatwierdz}" value="Save"/>
                        <h:commandButton action="index" value="Cancel" immediate="true"/>
                    </h:panelGrid>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
